package com.unknownman.block.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lianziyou.chain.common.api.CommonPage;
import com.unknownman.block.entity.TContractLogs;
import com.unknownman.block.entity.TNft;


/**
* <p>
    * NFT列表 服务类
    * </p>
*
* @author xhy
* @since 2021-10-15
*/
public interface TNftService extends IService<TNft> {
    /**
    * 查询NFT列表分页数据
    *
    * @param page      页码
    * @param limit 每页条数
    * @return CommonResult<TNft>
    */
    CommonPage<TNft> findListByPage(Integer page, Integer limit, String orderBy, QueryWrapper<TNft> queryWrapper);

    /**
     * 根据log保存ERC721转账数据
     * @param logs
     * @return
     */
    boolean saveByLog(TContractLogs logs);

    /**
     * 获取指定合约的指定NFT
     * @param contractConfigId
     * @param tokenId
     * @return
     */
    TNft getTokenByContractIdAndTokenId(Long contractConfigId, Long tokenId);

}
